package com.study.common;

import android.annotation.SuppressLint;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class DateUtil {

    @SuppressLint("SimpleDateFormat")
    public static SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    @SuppressLint("SimpleDateFormat")
    public static SimpleDateFormat DateFormat = new SimpleDateFormat("yyyy-MM-dd");

    @SuppressLint("SimpleDateFormat")
    public static SimpleDateFormat ChinaDateFormat = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss");

    public static String datePath(){
        Calendar instance = Calendar.getInstance();
        return instance.get(Calendar.YEAR)+"/"+(instance.get(Calendar.MONTH)+1)+"/"+instance.get(Calendar.DAY_OF_MONTH);
    }

    public static String currentTime(){
        Date date = new Date(System.currentTimeMillis());
        return format.format(date);
    }

}
